package com.primb.bench.project.init.contract;


import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.widget.ImageView;
import android.widget.TextView;

import com.primb.baselibs.base.BasePresenter;
import com.primb.baselibs.base.BaseView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Chen on 2017/4/14.
 * 功能描述：
 */

public class MainContract {


    public interface View {
        /**
         * 获取Fragment集合
         *
         * @return
         */
        List<Fragment> getFragmentList();

        /**
         * 获取文字控件集合
         *
         * @return
         */
        List<TextView> getBarTexts();

        /**
         * 获取icon图标集合
         *
         * @return
         */
        List<ImageView> getBarIcons();

        /**
         * 获取FragmentManager
         *
         * @return
         */
        FragmentManager getActivityFragmentManager();

        /**
         * 获取fragment的布局id
         *
         * @return
         */
        int getLayoutId();

        /**
         * 清除bottombar选中状态
         */
        void clearState(int[] normalIcons);

        /**
         * 选择状态设置
         *
         * @param position
         */
        void selectState(int position, int[] selectIcons);

        /**
         * 退出当前程序
         */
        void exitApp();
    }

    public interface Presenter extends BasePresenter {
        /**
         * 显示Fragment
         *
         * @param position
         */
        void showFragment(int position);

        /**
         * 隐藏Fragment
         */
        void hideFragments(FragmentTransaction transaction);

        /**
         * 设置默认选中的Fragment
         */
        void setDefaultFragment();

    }

    public interface Model {

        int[] getNormalIcons();
        int[] getSelectIcons();
    }
}